package com.sugar.subscribe.course.module.business.controller.app.config;

import com.sugar.subscribe.course.framework.common.pojo.CommonResult;
import com.sugar.subscribe.course.module.business.controller.app.config.vo.AppBasicConfigRespVO;
import com.sugar.subscribe.course.module.business.dal.redis.objlock.ObjectLockRedisDAO;
import com.sugar.subscribe.course.module.business.service.config.BizConfigService;
import com.sugar.subscribe.course.module.business.util.PoolUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;

import java.util.concurrent.locks.ReentrantLock;

import static com.sugar.subscribe.course.framework.common.pojo.CommonResult.success;

@Tag(name = "APP - 参数配置")
@RestController
@RequestMapping("/biz/biz-config")
@Validated
public class AppBizConfigController {

    @Resource
    private BizConfigService bizConfigService;

    @GetMapping("/get/basic")
    @Operation(summary = "获得项目基本信息")
    @PermitAll
    public CommonResult<AppBasicConfigRespVO> appGetBizConfigBasic() {
        return success(bizConfigService.appGetBizConfigBasic());
    }
}